@extends('admin/user/layout')

@if($menu='permission')@endif

@section('main')
    <div class="page-header clearfix">
        <h1 class="pull-left">权限管理</h1>
        <button class="btn btn-info btn-sm pull-right" data-toggle="modal" data-url="{{ url('admin/permission/create') }}" data-target="#modal"><span class="glyphicon glyphicon-plus"></span> 添加权限</button>
    </div>
    <table class="table table-striped">
        <tr>
            <th>name</th>
            <th>权限名称</th>
            <th>权限简介</th>
            <th width="35%">操作</th>
        </tr>
        @forelse($list as $vo)
            <tr>
                <td>{{ $vo->name }}</td>
                <td>{{ $vo->display_name }}</td>
                <td>{{ $vo->description }}</td>
                <td>
                    <button class="btn btn-default btn-sm"  data-toggle="modal" data-url="{{ url('admin/permission/'.$vo->id.'/edit') }}" data-target="#modal"><i class="glyphicon glyphicon-edit"></i> 修改</button>
                    <button class="btn btn-default btn-sm" disabled><i class="glyphicon glyphicon-trash"></i> 删除</button>
                </td>
            </tr>
            @empty
            <tr>
                <td colspan="20">
                    <div class="empty">暂无页面记录</div>
                </td>
            </tr>
        @endforelse
    </table>
    <?php echo $list->appends(Request::all())->render(); ?>

@endsection